<?php

require_once 'common/conn.php';
if (isset($_GET['start'])) {
    $num = $_GET['start'];
} else {
    $num = 0;
}
if (isset($_GET['limit'])) {
    $count = $_GET['limit'];
}

if (isset($_GET['usercode'])) {
    $usercode = $_GET['usercode'];
}

$data = array();
if (is_numeric($num) && is_numeric($count)) {
    $db = new DBC();    
    $sql = "SELECT * FROM t_share_record WHERE usercode = '".$usercode."' ORDER BY createTime DESC LIMIT " . $num . "," . $count;    
    $data = $db->fetchData($sql);    
}
echo json_encode($data);
?>